﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Configuration;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Oracle.DataAccess.Client;
using Oracle.DataAccess.Types;

public class ConexaoMDBD
{
	public ConexaoMDBD()
	{
	}

    public OracleConnection connMDBD()
    {
        OracleConnection connMDBD = new OracleConnection();
        connMDBD.ConnectionString = ConfigurationManager.ConnectionStrings["MetaDataBancoDeDados"].ConnectionString;
        connMDBD.Open();

        return connMDBD;
    }

    public OracleCommand cmdMDBD(String cmd)
    {
        OracleCommand cmdMDBD = new OracleCommand();
        cmdMDBD.CommandType = System.Data.CommandType.StoredProcedure;
        cmdMDBD.CommandText = cmd;
        cmdMDBD.Connection = connMDBD();

        return cmdMDBD;
    }
}
